# 6.3
from pip._vendor.idna import unichr

print('%s %s' % ('Spanish', 'Inquisition'))
s = ' '.join(('China', 'Canton', '中国', '广州'))
print(s)
print(s.upper())
print(('%s%s' % (s[:3], s[8])).upper())

foo = 'Hello' 'World'
print(foo)
url = 'https://' \
      'localhost' \
      ':8000' \
      '/cgi-bin/fridends.py'
print(url)

ustr = u'！'
print(ustr)

# 6.4
from string import Template

s = Template('There are ${howmany} ${lang} Quotation Symbols')
print(s.substitute(lang='python', howmany=3))
print(s.safe_substitute(lang='php'))

print(u'abc\u1234\n')
print(chr(67), unichr(36947))
print(ord('道'))
